<?php 
include('db.php');
$db = getDb();

if (isset($_POST['data'])) {
	
	$subEventId = $_POST['subEventId']; 
	$emailId = $_POST['emailId']; 
	$data = $_POST['data'];
    

	// message
	$sqlCommand="INSERT INTO userData(subeventId,emailId,data) values('".
			$subEventId . "','". $emailId . "','". $data."') ";
	$result = $db->Execute($sqlCommand);
	
	if ($result === false)
		die($sqlCommand);
	
	echo "Send OK";
	

} else {}
 ?>